{extend name="default/base/base_seller" /}
{block name="seller_main"}


<div class="dssc-index">


    <a href="javascript:history.go(-1)" class="btn" title="返回上一步">返回上一步</a>
    <table class="store-joinin order">
        <thead>
            <tr>
                <th colspan="20">订单信息</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>订单号：</th>
                <td>{$order_info.order_sn}</td>
                <th>订单状态：</th>
                <td>{$order_state[$order_info.order_state]}</td>
                <th>订单类型：</th>
                <td>{$order_type[$order_info.order_type]}</td>

            </tr>
            <tr>
                <th>订单预约时间：</th>
                <td>{$order_info.appointment_time}</td>
                <th>订单创建时间：</th>
                <td>{$order_info.add_time|date="Y-m-d H:i:s",###}</td>

            </tr>
            <tr>
                <th>订单备注：</th>
                <td>{$order_info.remarks}</td>
                <th>管理员备注：</th>
                <td>{$order_info.manager_remark}</td>
                <th>服务内容：</th>
                <td>{$order_info.service_content}</td>
            </tr>
        </tbody>
    </table>
    <?php
            if($order_info['parent_id'] == 0){
    ?>
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">订单价格信息</th>
        </tr>
        </thead>
        <tbody>
            <tr>
                <th>总订单费用：</th>
                <td>{$order_info.order_amount}</td>
                <th>上门费用：</th>
                <td>{$order_info.door_fee}</td>
                <th>工时合计：</th>
                <td>{$order_info.work_master_hous}</td>
            </tr>
            <tr>
                <th>工时费用合计：</th>
                <td>{$order_info.work_master_price}</td>
                <th>服务人员总费用：</th>
                <td>{$order_info.assign_mechanic_total}</td>
                <th>配件总费用：</th>
                <td>{$order_info.part_price}</td>
            </tr>
        </tbody>

    </table>
    <?php
        }
    ?>

    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">买家信息</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th>买家账号：</th>
            <td>{$order_info.member_name}</td>
            <th>运营商：</th>
            <td>{$order_info.invite_store_name}</td>
        </tr>
        </tbody>

    </table>
        {notempty name="order_info.address"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">客户信息</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th>客户姓名{$Think.lang.ds_colon}：</th>
            <td>{$order_info.address.address_realname}</td>
            <th>客户电话：</th>
            <td>{$order_info.appoint_phone}}</td>
            <th>客户地址{$Think.lang.ds_colon}：</th>
            <td>{$order_info.appoint_address}&nbsp;{$order_info.appoint_detail_address}</td>
        </tr>
        </tbody>

    </table>
        {/notempty}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">服务设备列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>设备编号：</td>
            <td>设备名称</td>
            <td>品牌</td>
        </tr>
        {foreach name="$order_info.goods_items" item="goods"}
        <tr>
            <td><p>{$goods.goods_id}</p></td>
            <td><p>{$goods.goods_name}</p></td>
            <td><span class="red_common">{$goods.b_name}</span></td>
        </tr>
        {/foreach}
        </tbody>

    </table>

        {notempty name="order_info.append_goods_items"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">追加服务设备列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="align-center">设备编号</td>
            <td class="align-center">设备名称</td>
            <td class="align-center">品牌</td>
            <td class="align-center">提交人</td>
            <td class="align-center">状态</td>
        </tr>
        {foreach name="$order_info.append_goods_items" item="goods"}
        <tr>
            <td ><p>{$goods.goods_id}</p></td>
            <td><p>{$goods.goods_name}</p></td>
            <td><span class="red_common">{$goods.b_name}</span></td>
            <td><p>
                {if $goods.is_backstage eq '0'}
                后台添加
                {else /}
                前台添加
                {/if}
            </p></td>
            <td><p>{$son_order_state[$goods.order_state]}</p></td>

        </tr>
        {/foreach}
        </tbody>

    </table>

        {/notempty}

        {notempty name="order_log"}
            <table class="store-joinin order">
                <thead>
                <tr>
                    <th colspan="20">订单日志</th>
                </tr>
                </thead>
                <tbody>
                    {foreach name="order_log" item="val"}
                    <tr>
                        <td>
                            {$val.log_role} {$val.log_user}&emsp;{$Think.lang.order_show_at}&emsp;{$val.log_time|date="Y-m-d H:i:s",###}&emsp;{$val.log_msg}
                        </td>
                    </tr>
                    {/foreach}
                </tbody>

            </table>
        {/notempty}

    {notempty name="appends"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">追加服务费列表</th>
        </tr>
        </thead>
        <tbody>
            <tr>
                <td>追加id</td>
                <td>追加时长</td>
                <td>追加单位时间收费</td>
                <td>合计</td>
                <td>状态</td>
                <td>申请日期</td>
            </tr>
            {foreach name="appends" item="append"}
            <tr>
                <td><p>{$append.id}</p></td>
                <td><p>{$append.add_hours}</p></td>
                <td><p>{$append.payper_hour}</p></td>

                <td><p>{$append.hours_total}</p></td>

                <td><span class="red_common">{$appendStatus[$append.status]}</span></td>
                <td><span class="red_common">{$append.created_at|date="Y-m-d H:i:s",###}</span></td>
            </tr>
            {/foreach}
        </tbody>

    </table>
    {/notempty}

    {notempty name="order_info.goods_parts"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">配件列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>配件编号</td>
            <td>配件名称+规格名</td>
            <td>品牌</td>
            <td>是否携带</td>
            <td>创建时间</td>
        </tr>
        {foreach name="order_info.goods_parts" item="append"}
        <tr>
            <td ><p>{$append.id}</p></td>
            <td ><p>{$append.part_name}</p></td>
            <td ><p>{$append.brand_name}</p></td>
            <td ><p>
                {if condition="($append.type==0)"}不需要
                {elseif condition="($append.type==1)"}需要
                {/if}
            </p></td>
            <td ><p>{$append.create_at|date="Y-m-d H:i:s",###}</p></td>
        </tr>
        {/foreach}
        </tbody>

    </table>
    {/notempty}

    {notempty name="order_mechanics"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">派单列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>派单id</td>
            <td>技术工姓名</td>
            <td>技工手机号</td>
            <td>派单状态</td>
            <td>创建日期</td>
        </tr>
        {foreach name="$order_mechanics" item="order_mechanic"}
        <tr>
            <td><p>{$order_mechanic.id}</p></td>
            <td><p>{$order_mechanic.name}</p></td>
            <td><p>{$order_mechanic.phone}</p></td>
            <td><span class="red_common">{$status[$order_mechanic.status]}</span></td>
            <td><span class="red_common">{$order_mechanic.create_at|date="Y-m-d H:i:s",###}</span></td>
        </tr>
        {/foreach}
        </tbody>

    </table>
    {/notempty}

    {notempty name="$order_info['order_reason']"}
    <table class="store-joinin order">
        <thead>
        <tr>
            <th colspan="20">审核不通过原因</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>{$order_info['order_reason']}</td>
        </tr>

        </tbody>

    </table>
    {/notempty}
</div>
<script>

    function edit_band_goods(ids_str,ids_str2) {
        _uri = ADMINSITEURL+"/order/order_list?order_id=" + ids_str;
        dsLayerOpen(_uri,'查看','900px','500px');
    }


    /**
     * Layer 通用ifram弹出窗口
     */
    function dsLayerOpen(url, title,width,height) {
        if (!width) width = '900px';
        if (!height) height = '500px';
        layer.open({
            type: 2,
            title: title,
            area: [width,height],
            fixed: false, //不固定
            maxmin: true,
            content: url
        });
    }
</script>


      
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
 
  </div>
</div>
{/block}
